<template>
    <div class="to-top-box" @click="goTop">
        Top
    </div>
</template>

<script>
    import {goTop} from '/src/assets/js/utils'
    export default {
        name: "ToTop",
        setup(){


            return{
                goTop
            }
        }
    }
</script>

<style scoped lang="less">

    .to-top-box{
        text-align: center;
        line-height: 50px;
        width: 50px;
        height: 50px;
        z-index: 99999;
        position: fixed;
        bottom:10px;
        left:20px;
        border-radius: 5px;
        background-color: #42b983;
        font-size: 20px;
        color: white;

    }
    .to-top-box:hover{
        cursor: pointer;
        background-color: #36936b;
    }
</style>